/* $Id: jsTerminalInitScript.js 59 2009-09-26 16:38:02Z iteahere $ */

importPackage(Packages.itea.bignews);
var bignews = {
	grant: function(email, module) {
		var am = beanFactory.getBean('authorizationManager');
		am.addAuthorization(email, module);
		println(am.listAuthorization(email));
	},
	revoke: function(email, module) {
		var am = beanFactory.getBean('authorizationManager');
		am.removeAuthorization(email, module || '*');
		println(am.listAuthorization(email));
	},
	listAuthorization: function(email) {
		var am = beanFactory.getBean('authorizationManager');
		println(am.listAuthorization(email));
	}
};